<div class="row">
  <form role="form" accept-charset="UTF-8" action="/admin/billorders" method="GET">
    <div class="col-lg-3">
      <div class="form-group">
        <label>手机号码</label>
        <input class="form-control" placeholder="input phone" name="phone" value="{{ query.phone }}">
      </div>
    </div>
    <div class="col-lg-3">
      <div class="form-group">
        <label>状态</label>
        {{ selectTag stateOptions stateCollection query.state }}
      </div>
    </div>
    <div class="col-lg-3">
      <div class="form-group">
        <label>类型</label>
        {{ selectTag exchangerTypeOptions exchangerTypeCollection query.exchangerType }}
      </div>
    </div>
    <div class="col-lg-3" style="padding-top: 19px;">
      <div class="form-group">
        <button type='submit' class="btn btn-info col-lg-8 pull-right">搜索</button>
      </div>
    </div>
  </form>
</div>
<hr>
<div class="row">
  <div class="col-lg-12">
    <div class="panel panel-default">
      <div class="panel-heading">
          流量管理
      </div>
      <!-- /.panel-heading -->
      <div class="panel-body">
        <div class="table-responsive">
          <table class="table table-striped">
            <thead>
              <tr>
                <th>手机号码</th>
                <th>用 户</th>
                  <th>用户名</th>
                <th>状 态</th>
                <th>花 费</th>
                <th>成 本</th>
                <th>微信支付</th>
                <th>支付手段</th>
                <th>获得话费</th>
                  <th>运营商</th>
                <th>创建时间</th>
                <th></th>
              </tr>
            </thead>
            <tbody>
              {{#each extractOrders.rows}}
                <tr>
                    <td>{{ phone }}</td>
                    <td>{{ customer.id }}</td>
                    <td><img src="{{customer.headimgurl}}" onError="this.src='http://placehold.it/380x380';" style="width: 36px;">{{ customer.username }}</td>
                    <td>{{ stateName }}</td>
                    <td>{{ total }}</td>
                    <td>{{ cost }}</td>
                    <td>{{ transactionId }}</td>
                    <td>{{ chargeTypeTran chargeType }}</td>
                    <td>{{ value }} 元</td>
                    <td>{{provider}}</td>
                    <td>
                      {{ strftime createdAt }}
                    </td>
                    <td>
                      <a href="/admin/billorders/{{id}}/edit" class="list-group-item">
                        <i class="glyphicon glyphicon-pencil"></i>
                      </a>
                    </td>
                </tr>
              {{/each}}
            </tbody>
          </table>
        </div>
        <!-- /.table-responsive -->
      </div>
      <div class="panel-footer">
          {{pagination extractOrders (addParams '/admin/billorders' query)}}
      </div>
      <!-- /.panel-body -->
    </div>
    <!-- /.panel -->
  </div>
</div>